﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization; // this is required


namespace DomainModel
{
    [DataContract]
    public class OrderItem
    {
        
        [DataMember]
        public int item_id = 0;
        [DataMember]
        public int order_id = 0;
        [DataMember]
        public int quantity = 0;
        [DataMember]
        public int product_id = 0;
        [DataMember]
        public double sub_total = 0;
        [DataMember]
        public int item_state = 0;

        // cal some speical type of order ex) coming soon and speical order
        public  virtual void calvalue() 
        {
            
        }


       
        public virtual void AddDiscount()
        {
           
        }

        public virtual void BuyOneGetOneFree()
        {

        }

        public virtual void DailyDeal()
        {
            if (product_id == 10)
                sub_total = sub_total * 0.9;
        }

    }
}